﻿<UserControl x:Class="QuizzUI.Quizz.FreeResponse"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="328" d:DesignWidth="300">
	<UserControl.Resources>
		<Storyboard x:Key="ScrollUpFadeOut">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="lblText">
				<EasingDoubleKeyFrame KeyTime="0" Value="4"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-59.931">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseOut" Exponent="5"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="lblText">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1.4" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseOut" Exponent="5"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="lblText">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="3">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="lblText">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="3"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="3"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="lblText">
				<EasingDoubleKeyFrame KeyTime="0" Value="100"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseOut" Exponent="10"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    <Border CornerRadius="10" Background="#cfcfcf" Margin="7">
        <Border.Effect>
            <DropShadowEffect BlurRadius="10" Opacity=".85" ShadowDepth="3" />
        </Border.Effect>
        <Grid Margin="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="2*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>            
            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Label Content="Question:" FontWeight="DemiBold" FontSize="14" Grid.Column="0" />
                    <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                        <Button Content="Pause Game" MinWidth="45" MaxHeight="23"
                                Name="btnPause"/>
                    </StackPanel>
                </Grid>
                <Border Grid.Row="1" CornerRadius="10" Margin="3">
                    <RichTextBox Name="rtbQuestion" IsReadOnly="True" />
                </Border>
            </Grid>
            <Grid Grid.Row="2" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Label Content="Answer:" FontWeight="DemiBold" FontSize="14" />
                
                <TextBox  Name="tbxAnswer" TextAlignment="Center" Grid.Row="1"
                    AcceptsReturn="False" TextWrapping="WrapWithOverflow" Margin="3"
                    FontSize="14" KeyDown="tbxAnswer_KeyDown"/>
            </Grid>

            <Label Grid.Row="1" Name="lblText" Content="Correct!" HorizontalAlignment="Center" VerticalAlignment="Bottom"
                       FontSize="20" FontWeight="DemiBold" Foreground="Green" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
            	<Label.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Label.RenderTransform>
            </Label>
            <GridSplitter Grid.Row="2" VerticalAlignment="Top" Height="1"
                    HorizontalAlignment="Stretch" Background="Black"/>
        </Grid>
    </Border>
</UserControl>
